package com.cbh.feign.controller.institution;



import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.institution.AgencyCompany;
import com.cbh.api.model.institution.OfferInterface;

public interface AgencyCompanyControllerBase {

	/**
	 * 获取代理公司下全部报价接口信息 new 
	 * 
	 * @param corporate
	 * @param accountToken
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/agency/company/corporate", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<OfferInterface>> queryByCorporateId(
			@RequestParam(value = "accountToken", required = true) String accountToken); 
		
	
	/**
	 * 代理公司保存<br>
	 * 需要验证用户是否有操作权限<br>
	 * 
	 * @param accountToken
	 * @param ob
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/agency/company", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestBody(required = true) AgencyCompany ob) ;

	/**
	 * 获取代理公司
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/agency/company/id", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<AgencyCompany> getOne(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);

	/**
	 * 获取代理公司列表全部
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/agency/company", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<AgencyCompany>> getAll(
			@RequestParam(value = "accountToken", required = true) String accountToken);

	/**
	 * 禁用代理公司
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/agency/company/disable/{id}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Boolean> disable(
			 @RequestParam(value = "accountToken", required = true) String accountToken,
			@PathVariable("id") String id) ;

	/**
	 * 启用代理公司
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/agency/company/enable/{id}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Boolean> enable(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@PathVariable("id") String id) ;

}
